<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>参赛作品</title>
<link href="css/main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/validator.js"></script>
<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript" src="js/global.js"></script>
<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript" src="js/uploadify/jquery.uploadify.v2.1.0.min.js"></script>
<link rel="stylesheet" href="js/uploadify/uploadify.css" type="text/css" media="all" />
<link href="js/thickbox.css" rel="stylesheet" type="text/css" />
<style type="text/css"> 
<!--
body {
	background-color: #3E3E3E;
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.STYLE1 {
	color: #FFFF00;
	font-weight: bold;
}
.STYLE2 {color: #990000}
.STYLE4 {color: #990000; font-weight: bold; }
.STYLE5 {
	color: #4a4a4a;
	font-weight: bold;
}
.STYLE6 {color: #CCCCCC}
.STYLE8 {color: #CCFFCC}
-->
</style></head>
 
<body>

<style type="text/css">
.tablePost th{
	color:#fff;
	font-size:12px;
	font-weight:bold;
	line-height:25px;
}
</style>
<br/>
<br/>

<form action="post.php?small=true" method="post" enctype="multipart/form-data" class="tablePost">
    <table width="95%"  border="0" align="center"  cellspacing="0" cellpadding="0">
      <tr>
        <th width="150">标　　题：</th>
        <td align="left"><input type="text" name="title" id="title" datatype="limit" min="2" max="50" msg="标题最少为2个字符，最长为50个字符" require="true"/></td>
      </tr>
      <tr>
        <th>照　　片：</th>
        <td align="left">
		<div id="divimageurl"></div>
		<input type="text" name="imageurl" id="imageurl"/>
		<input type="hidden" name="thumburl" id="thumburl"/>
		</td>
		</td>
      </tr>
      <tr>
        <th>作　　者：</th>
        <td align="left"><input type="text" name="author" id="author"  datatype="limit" min="2" max="50" msg="作者最少为2个字符，最长为50个字符"/></td>
      </tr>
      <tr>
        <th>电　　话：</th>
        <td align="left"><input type="text" name="phone" id="phone" datatype="limit|number" min="2" max="50" msg="电话只能位数字" min="2" max="50" require="true"/></td>
      </tr>
     <!-- <tr>
        <td>作　　品：</td>
        <td align="left"><textarea name="content" id="content"></textarea></td>
      </tr>-->
      <tr>
        <th>描　　述：</th>
        <td align="left"><textarea name="description" id="description" cols='35' rows='10' datatype="limit" msg="描述最少为10个字符，最多为100个字符" min="20" max="400" require="true"></textarea></td>
      </tr>
      <tr>
        <th>&nbsp;</th>
        <td align="left">
		<input type="hidden" name="step" id="step" value="2">
		<input type="submit" value=" 提 交 " class="Btn BtnNml" id="submit" disabled/>
		</td>
      </tr>
    </table>
</form>
    </td>
  </tr>
</table>
<script language="javascript">
$(function(){
	$("form").checkForm(1);
	fileupload("imageurl","*.png;*.gif;*.jpeg;*.jpg;*.jsp","<?php echo $_CONFIG['uploadmax']*1024;?>");
});
function uploadfinish(event,queueid,fileObj,response,data){
	if(response.indexOf("Success")!=-1){
		response = response.replace("Success:","");
		var obj = response.split("|");
		$("#imageurl").val(obj[0]);
		$("#thumburl").val(obj[1]);
		$("#submit").attr("disabled",false);
		$("#divimageurl").html("<img src='"+obj[1]+"' class='thickbox' href='"+obj[0]+"'/>");
		alert("上传成功");
	}else{
		alert(response);
	}
}
</script>
</body>
</html>